#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>
int main()
{
    int hour = 0;
    int minute = 0;
    int k = 0;
    scanf("%d:%d %d", &hour, &minute, &k);
    hour = (hour + (k / 60) % 24) % 24;
    if (minute + (k % 60) > 60)
    {
        hour++;
    }
    minute = (minute + (k % 60)) % 60;
    printf("%#02d:%#02d", hour, minute);

    return 0;
}